package com.example.web.controller;

import com.example.web.swagger.ILoginController;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.LinkedHashMap;
import java.util.Map;

@RestController
public class LoginController implements ILoginController {

    @Override
    public Map<String, Object> login1(
            @RequestParam("username") String username,
            @RequestParam("password") String password) {

        Map<String, Object> map = new LinkedHashMap<>();
        map.put("code", 200);
        map.put("msg", "success");

        return map;
    }

    @Override
    public Map<String, Object> login2(
            @RequestParam("username") String username,
            @RequestParam("password") String password) {

        Map<String, Object> map = new LinkedHashMap<>();
        map.put("code", 200);
        map.put("msg", "success");

        return map;
    }
}
